import 'package:bi_project/http/core/hi_net.dart';
import 'package:bi_project/http/core/mock_home_adapter.dart';
import 'package:bi_project/http/request/home_request.dart';
import 'package:bi_project/model/home_mo.dart';

import '../core/hi_net_adapter.dart';

class HomeDao {
  static get(String categoryName, {int pageIndex = 1, int pageSize = 1}) async {
    // 因没有数据，则使用测试数据
    // HomeRequest request = HomeRequest();
    // request.pathParams = categoryName;
    // request.add("pageIndex", pageIndex).add("pageSize", pageSize);
    // var result = await HiNet.getInstance().fire(request);
    MockHomeAdapter adapter = MockHomeAdapter();
    var result = await adapter.send();
    print(result);
    return HomeMo.fromJson(result.data);
  }
}
